package com.litchishell.feartures.predicate.impl;

import com.litchishell.feartures.pojo.Apple;
import com.litchishell.feartures.predicate.ApplePredicate;

/**
 * @author LitchiShell
 * @description:
 * @create 2021-11-14
 */
public class AppleFancyPredicate implements ApplePredicate {
    @Override
    public String accept(Apple apple) {
        String characteristic = apple.getWights() > 180 ? "HEAVY" : "LIGHT";
        return "A" + characteristic +" " + apple.getColor() + " apple";
    }
}
